<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
     <table border="1" align="center"  width="80%">
           <tr>
               <th>编号</th>
               <th>名称</th>
               <th>操作</th>
           </tr>

           <tr align="center" th:each="d:${list}">
               <td th:text="${d.depId}">
                   1
               </td>

               <td th:text="${d.depName}">
                   国防部
               </td>

               <td>
                   <button th:onclick="'del('+${d.depId}+')'">删除</button>
               </td>
           </tr>

     </table>
</body>
</html>

<script>
     function del(id) {
           alert(id);

           var age = [[${age}]];
           alert(age);
     }

</script>